package me.pcqpcq.android.tvlauncher.app;

import android.app.Application;
import android.util.Log;

/**
 *
 * Application
 * @author pcqpcq
 * @version 1.0.0
 * @since 13-10-31 下午8:02
 */
public class TVApplication extends Application {

    private static final String TAG = TVApplication.class.getSimpleName();

    private static TVApplication sInstance;

    /**
     * 获取全局Application对象
     * @since 2013.08.02 修改错误提示内容为Application by pcqpcq
     * @return
     */
    public static TVApplication getInstance(){
        if (sInstance == null) {
            Log.e(TAG, "THE APPLICATION OF YOUR PROJECT MUST BE 'TVApplication', OR SOMEONE EXTEND FROM IT");
        }
        return sInstance;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        sInstance = this;
    }

}
